Skip to content

feat(fuzzyfinder): add TODO/FIXME finder source#333

Open
jongio wants to merge 1 commit into
mainfrom
idea/fuzzy-todo-source
Open

feat(fuzzyfinder): add TODO/FIXME finder source#333
jongio wants to merge 1 commit into
mainfrom
idea/fuzzy-todo-source

Conversation

@jongio

@jongio jongio commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Adds a fuzzy finder source that scans the working tree for TODO, FIXME, HACK, BUG, and XXX markers so you can jump straight to the next thing that needs attention without leaving grut.

What it does

  • Press T to open the finder over every marker in the tree.
  • Each entry shows file:line plus the marker text (for example internal/app.go:42 TODO wire this up).
  • Selecting an entry opens the file in the preview and scrolls to the exact line.

How it works

  • New TodoSource in internal/panels/fuzzyfinder walks the tree reusing the same hidden-directory skip, non-navigable directory list, and .gitignore filtering the existing file source uses.
  • Binary files are skipped (NUL byte sniff over the first 8KB), and file size and total result counts are capped so large repos stay responsive.
  • Item gains a Line field so a selected entry can carry a jump target. FileSelectedMsg gains a matching Line, and the preview applies it once the file finishes loading (skipping binary and oversized files).
  • T is bound to the new todo_finder action in the default, classic, and vim schemes, and the help overlay data (keybindings.json) plus generated docs/keybindings.md are updated.

Tests

  • Marker scanning across all five markers, absolute-path values, binary skip, .gitignore respect, non-navigable dir skip, and nil/empty root.
  • matchTodoLine table covering colon and no-colon messages, end-of-line markers, word-boundary rejection (autoTODOlist), and lowercase rejection.
  • Preview jump-to-line after an async load, and a no-line case that stays at the top.
  • Fuzzy finder selection emits a FileSelectedMsg carrying the line, and the todo_finder action opens the finder.

Closes #327

Co-authored-by: Copilot App [email protected]

Press T to open a fuzzy finder over TODO, FIXME, HACK, BUG, and XXX
markers across the working tree. Each entry shows file:line plus the
marker text; selecting one opens the file in the preview and jumps to
the line. The scanner walks the tree with the same hidden-dir and
.gitignore filtering the file source uses, skips binary files, and
caps file size and result count so large repos stay responsive.

Wiring:
- new TodoSource in internal/panels/fuzzyfinder
- Item gains a Line field so selection can carry a jump target
- FileSelectedMsg gains Line; preview applies it after the file loads
- T bound to todo_finder in the default, classic, and vim schemes
- keybindings.json and docs/keybindings.md updated

Closes #327

Co-authored-by: Copilot App <[email protected]>
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 13, 2026
@jongio jongio self-assigned this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idea Feature idea from the idea pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a TODO/FIXME source to the fuzzy finder

1 participant